package com.guoxue.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.guoxue.dao.IDistrictDao;
import com.guoxue.domain.DistrictVo;
@Repository
public class DistrictDaoImpl extends BaseDaoImpl<DistrictVo> implements IDistrictDao{

	@Override
	public void saveDistrict(DistrictVo dt) {
		saveOrUpdate(dt);
	}

	@Override
	public List<DistrictVo> getDistrictList() {
		return find("From DistrictVo");
	}

	@Override
	public void deleteDistrict(int id) {
		executeHql("DELETE FROM DistrictVo d WHERE d.id=?", new Object[] {id});
	}

}
